# Created by Gao Song on 2022-03-29


import pandas as pd
import numpy as np
from .rq import rq
from .symbols import symbol_type
from .future import *
from .stock import *

# MUST SAME TYPE
def get_current_price(symbols):
    if len(symbols) == 0:
        return pd.Series()

    st = symbol_type(symbols[0])
    if st == 'stock':
        return get_current_price_stock(symbols)
    elif st == 'future':
        return get_current_price_future(symbols)

# MUST SAME TYPE
def get_current_pct(symbols):
    if len(symbols) == 0:
        return pd.Series()

    st = symbol_type(symbols[0])
    if st == 'stock':
        return get_current_pct_stock(symbols)
    elif st == 'future':
        return get_current_pct_future(symbols)
